#! /usr/bin/perl -l

if ($ARGV[1]==1) {
    print "java -jar /users/Etu9/2700019/LI230/psar/RootNodedht.jar &";
    $next=$ARGV[0]+1;
    
    if ($next<10) {
	$next="0$next";
    }
    
    print "ssh 2700019@ari-31-201-$next \"java -jar /users/Etu9/2700019/LI230/psar/clientMassPsar.jar 132.227.114.33\"";
}
elsif ($ARGV[0]!=16) {
    $next=$ARGV[0]+1;

    if ($next<10) {
	$next="0$next";
    }

    print "ssh 2700019@ari-31-201-$next \"java -jar /users/Etu9/2700019/LI230/psar/clientMassPsar.jar 132.227.114.33\"";
}
    
else {
    print "ssh 2700019@ari-31-201-$ARGV[0] \"java -jar /users/Etu9/2700019/LI230/psar/clientMassPsar.jar 132.227.114.33\"";
}
